import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/login',
    method: 'post',
    params:{
      username:data.username,
      password:data.password
    }
  })
}

export function getUserInfo(){
  return request({
    url:'/users/me'
  })
}

export function updatePassword(userId,password){
  return request({
    url:`/users/${userId}/password?password=${password}`,
    method:'patch'
  })
}
